package main

type userInfo struct {
	UserHard string
	UserAccount string
	Passwd1 string
	Passwd2 string
	Passwd3 string
	Passwd4 string
	Passwd5 string
	Passwd6 string
	Passwd7 string
	Passwd8 string
	Passwd9 string
	Passwd10 string
	Passwd11 string
	Passwd12 string
	Passwd13 string
	Passwd14 string
	Passwd15 string
	Passwd16 string
	Passwd17 string
	Passwd18 string
	Passwd19 string
	Passwd20 string
	Passwd21 string
	Passwd22 string
	Passwd23 string
	Passwd24 string
	Passwd25 string
	Passwd26 string
	Passwd27 string
	Passwd28 string
	Passwd29 string
	Passwd30 string
	Passwd31 string
	URL string
}

func ReturnPasswd(info *userInfo,day int) string {
	switch day {
	case 1:
		return info.Passwd1
	case 2:
		return info.Passwd2
	case 3:
		return info.Passwd3
	case 4:
		return info.Passwd4
	case 5:
		return info.Passwd5
	case 6:
		return info.Passwd6
	case 7:
		return info.Passwd7
	case 8:
		return info.Passwd8
	case 9:
		return info.Passwd9
	case 10:
		return info.Passwd10
	case 11:
		return info.Passwd11
	case 12:
		return info.Passwd12
	case 13:
		return info.Passwd13
	case 14:
		return info.Passwd14
	case 15:
		return info.Passwd15
	case 16:
		return info.Passwd16
	case 17:
		return info.Passwd17
	case 18:
		return info.Passwd18
	case 19:
		return info.Passwd19
	case 20:
		return info.Passwd20
	case 21:
		return info.Passwd21
	case 22:
		return info.Passwd22
	case 23:
		return info.Passwd23
	case 24:
		return info.Passwd24
	case 25:
		return info.Passwd25
	case 26:
		return info.Passwd26
	case 27:
		return info.Passwd27
	case 28:
		return info.Passwd28
	case 29:
		return info.Passwd29
	case 30:
		return info.Passwd28
	case 31:
		return info.Passwd29
	}
	return ""
}

func SavePasswd(info *userInfo,password string,day int)  {
	switch day {
	case 1:
		info.Passwd1 = password
	case 2:
		info.Passwd2 = password
	case 3:
		info.Passwd3 = password
	case 4:
		info.Passwd4 = password
	case 5:
		info.Passwd5 = password
	case 6:
		info.Passwd6 = password
	case 7:
		info.Passwd7 = password
	case 8:
		info.Passwd8 = password
	case 9:
		info.Passwd9 = password
	case 10:
		info.Passwd10 = password
	case 11:
		info.Passwd11 = password
	case 12:
		info.Passwd12 = password
	case 13:
		info.Passwd13 = password
	case 14:
		info.Passwd14 = password
	case 15:
		info.Passwd15 = password
	case 16:
		info.Passwd16 = password
	case 17:
		info.Passwd17 = password
	case 18:
		info.Passwd18 = password
	case 19:
		info.Passwd19 = password
	case 20:
		info.Passwd20 = password
	case 21:
		info.Passwd21 = password
	case 22:
		info.Passwd22 = password
	case 23:
		info.Passwd23 = password
	case 24:
		info.Passwd24 = password
	case 25:
		info.Passwd25 = password
	case 26:
		info.Passwd26 = password
	case 27:
		info.Passwd27 = password
	case 28:
		info.Passwd28 = password
	case 29:
		info.Passwd29 = password
	case 30:
		info.Passwd30 = password
	case 31:
		info.Passwd31 = password
	}
}